<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <input id="grade" value=""><button id="btn">判断</button><input id="result" value="">
</body>
<script>
    var gradeInp=document.getElementById("grade");
    var btnButton=document.getElementById("btn");
    var resultInp=document.getElementById("result");
    console.log(gradeInp,btnButton,resultInp);
    btnButton.onclick=function (){
        var score=gradeInp.value;
        var a;
        console.log(score);
        if(score<=100&&score>=0){
        if(score>85){
            if(score>95){
                a="奖金1000";
            }
            else if(score>90){
                a="奖金800";
            }
            else{
                a="奖金300";
            }
        }
        else if(score>75){
                a="良好";
        }
        else if(score>60){
                a="及格";
        }
        else{
                a="不及格";
        }
        }
        else{
            a="请输入正确的数字";
        }
        resultInp.value=a;
    }
</script>
</html>